<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/4
 * Time: 16:14
 */

namespace app\common\validate;

class Classroom extends \think\Validate
{
    protected $rule = [
        'title|标题' => 'require|max:100|token',
        'seo_title|简略标题' => 'require',
        'cid' => 'require|number',
//        'key|关键词' => 'require',
        'center|内容' => 'require',
        'miaoshu|摘要' => 'require',
//        'tag|标签' =>  'require',
//        'issue|文章作者' => 'require',
        'status' => 'number|in:1,0',
    ];

    protected $message = [
        'cid' => '分类错误',
        'status' => '校验范围不合法',
    ];

    protected $scene = [
        'add' => ['name', 'email'],
        'edit' => ['email'],
    ];

}